package com.itheima.domain;

import java.util.Scanner;

public class Arr6 {
    public static void main(String[] args) {
        int []arr={11,22,33,44,55};
        Scanner sc= new Scanner(System.in);
        System.out.println("请输入您要查找的数");
        int num = sc.nextInt();
        int index= -1;
        for (int i = 0; i < arr.length; i++) {
            if (num==arr[i]){
                index=i;
                break;
            }
        }
        System.out.println(index);
    }
}
